<?php

namespace Government\Controller;

use Zend\Mvc\Controller\AbstractRestfulController;
use Zend\View\Model\ViewModel;
use \Mongo;

class ApiController extends AbstractRestfulController{


    /**
     * REST GET LIST
     */
    public function get( $id ){
        return new ViewModel(array(
            'government' => $this->getServiceLocator()
                ->get('Government\Model\GovernmentService')->find( $id )
        ));        
    }

    /**
     * REST GET
     */
    public function getList(){
        return new ViewModel(array(
        	'governments' => $this->getServiceLocator()
        		->get('Government\Model\GovernmentService')->listAll()
        ));    	
    	
    }

    /**
     * REST POST
     */
    public function create($data){}

    /**
     * REST PUT
     */
    public function update($id, $data){}
    
   	/**
     * REST DELETE
     */
    public function delete( $id ){}


}